Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/simple structs #53

Merged
merged 84 commits into from
Feb 22, 2024
Merged

Feature/simple structs #53

merged 84 commits into from
Feb 22, 2024

Conversation

zeroknots
Copy link
Member

Simplifying registry

@zeroknots zeroknots marked this pull request as ready for review February 20, 2024 15:11
import { ResolverUID } from "../src/DataTypes.sol";
import { console2 } from "forge-std/console2.sol";
import "./Create2Factory.sol";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think this is needed right? We could just deploy using new Registry{salt: salt}()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that actually using 0age's factory tho? so we can use existing rust + openCL tooling to compute salts for vanity addresses?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, yeah this is using Nicks factory afaik so good point

function run() public {
bytes32 salt = bytes32(uint256(2));
bytes32 salt = 0x05a40beaf368eb6b2bc5665901a885c044c19346fc828ba80a35fe4cc30d0000;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did u already mine this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. just a few zeros to test that its working with the tooling we will want to use

}
return size > 0;
function _isContract(address addr) view returns (bool) {
return addr.code.length > 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could use assembly here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually moved it from assembly to solidity for better readability

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, imo bc this is super simple assembly would be fine but up to you

src/Registry.sol Outdated Show resolved Hide resolved
Copy link

codecov bot commented Feb 21, 2024

Welcome to Codecov 🎉

Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.

Thanks for integrating Codecov - We've got you covered ☂️

@zeroknots zeroknots merged commit 88fbf19 into main Feb 22, 2024
9 of 10 checks passed
@kopy-kat kopy-kat deleted the feature/simple-structs branch April 9, 2024 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants